package com.bw.controller;

import com.bw.entity.Bing;
import com.bw.entity.Zzt;
import com.bw.mapper.TuMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class TuController {

    @Autowired
    TuMapper tuMapper;

    @RequestMapping("/tu.do")
    public String tu(){

        return "tu";
    }


    @RequestMapping("/zzt.do")
    @ResponseBody
    public  List<Zzt> zzt(){

        List<Zzt> zztList = tuMapper.zzt();

        return zztList;
    }


    @RequestMapping("/bing.do")
    @ResponseBody
    public  List<Bing> bing(String group){

        List<Bing> bingList = tuMapper.bingByParam(group);

        return bingList;
    }
}
